#include "export.h"

void set_remote(const char* ip, int port)
{
	return sfacade.set_remote(ip, port);
}

bool bind_to(int port)
{
	return sfacade.bind_to(port);
}

bool send_to_client(int id, const char* data, int len)
{
	return sfacade.send_to_client(id, data, len);
}

bool send_to_server(int id, const char* data, int len)
{
	return sfacade.send_to_server(id, data, len);
}

void remove_connection(int id)
{
	sfacade.break_connetion(id);
}

void set_on_client_connect(connect_handle callback)
{
	sfacade.regist_on_client_connect(callback);
}

void set_on_client_disconnect(connect_handle callback)
{
	sfacade.regist_on_client_disconnect(callback);
}

void set_on_client_message(message_handle callback)
{
	sfacade.regist_on_client_message(callback);
}

void set_on_client_error(error_handle callback)
{
	sfacade.regist_on_client_error(callback);
}

void set_on_server_connect(connect_handle callback)
{
	sfacade.regist_on_server_connect(callback);
}

void set_on_server_disconnect(connect_handle callback)
{
	sfacade.regist_on_server_disconnect(callback);
}

void set_on_server_message(message_handle callback)
{
	sfacade.regist_on_server_message(callback);
}

void set_on_server_error(error_handle callback)
{
	sfacade.regist_on_server_error(callback);
}
